package liangtWorkSpace.threadDemo.soter;

/**
 * @ClassName Customers
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/7/4 18:41
 */
public class Customers extends Thread{
    KFC kfc;

    public Customers (KFC kfcs){
        this.kfc = kfcs;
    }
    @Override
    public void run() {
        super.run();
        int size=(int)(Math.random()*5);//每次要消费的食物的数量
        while (true) {
            kfc.consu(size);//在消费的方法里面传入参数
        }
    }
}
